Conventionally, there has been a mobile IP (Mobile Internet Protocol) as a technique in which even if a communication terminal (MN: Mobile Node) has moved, it can continue communication in the same manner before moving. In the mobile IP, the mobile node has a home address (HoA) and a care-of address (CoA). A home agent (HA) forwards a packet addressed to the home address to a care-of address through which the mobile node is communicable at that time so that the mobile node can continue communication using the same address as that before moving. A mobile IP corresponding to IPv6 (IP version 6) is called MIPv6, and its specification is defined by IETF (Internet Engineering Task Force) (see Non-Patent Document 1 below).
The mobile node performs processing (binding update) for notifying the home agent of the care-of address as a forwarding destination of the packet addressed to the home address. The mobile node transmits a BU (Binding Update) message to notify the home agent of the care-of address. The home agent updates a BC (Binding Cache) in which a pair of the home address and the care-of address of the mobile node is registered, and returns a BA (Binding Acknowledgement) message as a reply to the BU message.
Non-Patent Document 1: “Mobility Support in IPv6,” RFC3775.
However, in this conventional binding update procedure, there is a case where the binding update cannot be made well. Specifically, the BA message ends up in a loop on a route so that it cannot be delivered to the mobile node.
The case where the binding update cannot be made well will be specifically described in detail with reference to FIG. 14A to FIG. 14D. It is assumed that a MN registers its home address in a HA1 and a HA2. It is also assumed that, as shown in FIG. 14A, the MN registers HoA1=Addr1 and CoA1=Addr2 in the HA1. Therefore, a packet addressed to Addr1 is forwarded to Addr2. Further, it is assumed that the MN registers HoA2=Addr2 and CoA2=Addr3 in the HA2. Thus, the packet addressed to Addr1 is forwarded by the HA1 to Addr2, further forwarded by the HA2 to Addr3, and received by the MN.
Suppose that the MN transmits a BU message to the HA2 at this time to change the CoA from Addr3 to Addr1 as shown in FIG. 14B. In this case, as shown in FIG. 14C, the HA2 updates the BC and transmits a BA message. Since the BA message is transmitted toward the MN, the destination is Addr1. Therefore, the packet addressed to Addr1 is delivered to the HA1, and forwarded by the HA1 to Addr2. Further, since the destination of this packet is Addr2, it is delivered to the HA2 and forwarded by the HA2 to Addr1. Thus, as shown in FIG. 14D, the BA message ends up looping between the HA1 and the HA2. Here, FIG. 15 shows a packet structure when such a situation that a BA message is transferred in a loop between HAs occurs in the BU procedure.
First, a case where a communication partner (CN: Correspondent Node) transmits a packet to Addr1 of the MN as a basic action will be described. The CN transmits a packet with its destination=Addr1 and source=CN. The HA1 receives the transmitted packet, adds a header indicative of being addressed to Addr2, and forwards it to Addr2. The HA2 receives the packet addressed to Addr2, adds a header indicative of being addressed to Addr3, and forwards it to Addr3.
Next, a case where the MN transmits a BU message will be described with reference to FIG. 16. The MN creates a BU message for causing the HA2 to change the CoA to Addr1. In the data part of the BU message, information indicating that the HoA is Addr2 is inserted. The CoA(Addr1) is the source address (Src.) of the BU message. The MN adds, to this BU message, a header indicating that the destination address (Dst.) is the HA1 and the source address is Addr2. When the HA1 receives this encapsulated packet, the HA1 checks the source address of the outer header and the source address of the inner header before removing the outer header. The HA1 has an entry (HoA1=addr1, CoA1=addr2) of the MN in BC. The HA1 checks if the source address of the outer header is CoA1 (=addr2) and if the source address of the inner header is HoA1 (=addr1). If these addresses are correct, the HA1 removes the outer header and transmits the inner packet to HA2. In this case, the inner packet includes the BU message as data.
Further, the MN adds, to the above-mentioned encapsulated BU message addressed to the HA1, a header indicating that the destination address is to the HA2 and the source address is Addr3. When the HA2 receives this encapsulated packet, the HA2 checks the source address of the outer header and the source address of the inner header before removing the outer header. The HA2 has an entry (HoA2=addr2, CoA2=addr3) of the MN in BC. The HA2 checks if the source address of the outer header is CoA2 (=addr3) and if the source address of the inner header is HoA2 (=addr2). If these addresses are correct, the HA2 removes the outer header and transmits the inner packet to HA1. In this case, the inner packet includes the encapsurated packet that includes the BU message as data.
In other words, the MN creates a BU message addressed to the HA2, encapsulates it in such a manner that the BU message passes through the HA1, further creates a packet encapsulated in such a manner that the encapsulated packet passes through the HA2, and transmits the created packet to the HA2. The outer header is removed from the packet by the HA2 and transmitted to the HA1. Further, the outer header is removed by the HA1 so that the BU message is decapsulated and transmitted to the HA2. The HA2 receives this BU message, updates the BC, and transmits a BA message.
Here, the BA message has a packet structure as shown in FIG. 17. The HA2 creates and transmits a BA message addressed to Addr1 as a new CoA of the MN. The packet addressed to Addr1 is delivered to the HA1, and the HA1 forwards it with additional header in which the destination address is Addr2 according to the BC. The packet addressed to Addr2 is delivered to the HA2, and the HA2 forwards it with additional header in which the destination address is Addr1 in the same manner according to the BC. Thus, the BA message transmitted by the HA2 ends up looping between the HA1 and the HA2. As mentioned above, in the binding update procedure for the conventional mobile IP, when a binding is to be updated, there is a case where the binding update cannot be made correctly. Therefore, there is a problem that the BA message as a reply message is forwarded endlessly between the HAs and hence it can never be delivered to the MN. Note that, although the above described the case where the number of HAs is two, the same situation can occur when the number of HAs is three or more. For example, such a case is shown in FIG. 18.
Here, a situation as shown in FIG. 19A to FIG. 19E is considered as the case where the number of HAs is two and the MN transmits the above-mentioned BU message. As shown in FIG. 19A, it is assumed that the MN is communicating with a CN1 using Addr1. Then, as shown in FIG. 19B, it is assumed that the MN moves to another network and gets a new address Addr2. The MN transmits the BU message to the HA1, having the HA1 forward a packet addressed to Addr1 (HoA) to Addr2 (CoA). Next, as shown in FIG. 19C, it is assumed that the MN initiates communication with a CN2 using Addr2, and then, it further moves and gets a new address Addr3. The MN transmits the BU message to the HA2 to that the HA2 forward a packet addressed to Addr2 (HoA) to Addr3 (CoA).
Here, as shown in FIG. 19D, it is assumed that this MN has returned to the initial (previous) network. Then, as shown in FIG. 19E, it is assumed that the MN makes changes to return a packet from the CN1 so as to receive the packet via the HA1, and to forward, to the HA1, a packet from the CN2 after being forwarded to the HA2 so as to receive the packet via the HA1. At this time, there are two ways depending on which of bindings, a binding of the HA1 or a binding of the HA2, should be changed first.
As shown in FIG. 20B (indicating one state after FIG. 20A) to FIG. 20D, if a way to update the binding of the HA1 first and the binding of the HA2 next is performed, they can be changed to desired binding states. However, as shown in FIG. 20E (indicating the other state after FIG. 20A), if the binding of the HA2 has been updated first, the total binding is not updated correctly as described above, resulting in a situation where the BA message is forwarded in a loop between the HAs and cannot be delivered to the MN. Thus, it can be said that the problem to be solved by the present invention can arise under a certain condition.